#ifndef TSEARCHER_H
#define TSEARCHER_H

#include <QtWidgets/QMainWindow>

class ItemsModel;
class GuiTaskManager;
enum class SearchMethod;

namespace Ui
{
    class TSearcherClass;
}

class TSearcherWindow : public QMainWindow
{
    Q_OBJECT
public:
    TSearcherWindow(QWidget *parent = 0);
    ~TSearcherWindow();
public:
    // Methods:
    void disableFunctions();
    void enableFunctions();
    void setFunctionsEnable(bool enable);
public:
    // Accessors:
    GuiTaskManager *taskHelper() { return _taskHelper; }

private slots:
    void on_actionTest_triggered();
    void on_searchTaobaoButton_clicked();
    void on_searchTmallButton_clicked();
    void on_searchTBccButton_clicked();
    void on_sendBasicInformationButton_clicked();
    void on_startButton_clicked();
    void on_action_clearCookie_triggered();
    void on_action_changeMAC_triggered();
    void on_action_history_triggered();
public:
    QString sortDescript() const;
    SearchMethod searchMethod() const;

private:
    GuiTaskManager *_taskHelper = nullptr;
public:
    static TSearcherWindow *instance(){ return _instance; }
private:
    static TSearcherWindow *_instance;
public:
    Ui::TSearcherClass *ui;
};

#endif // TSEARCHER_H
